(1) Field of the Invention
The present invention relates to a buffer storage system provided between an instruction executing portion and a main storage to enable fast fetching and storing of data in a frequently-accessed address area by the instruction executing portion. The present invention relates, in particular, to a buffer storage system wherein a write-back (store-in) mechanism is used to maintain identity between the contents of the buffer storage and the corresponding portion of the main storage.
In many computer systems, a buffer storage system (cache memory system) comprising a relatively small capacity and fast but high-cost memory device is provided between an instruction executing portion in a central processing unit and a main storage to enable fast fetching and storing of data in a frequently-accessed address area by the instruction executing portion.
Generally, in the above-mentioned buffer storage, copies of the contents of a plurality of block areas of the main storage are stored because data fetching and storing operations are often carried out successively in the same address area by the instruction executing portion, and because operations of searching the address of required data in the buffer storage is rather easy when data is stored in blocks.
When data required in the central processing unit is found in the buffer storage (i.e., when a cache hit occurs), the data stored in the buffer storage is fetched by the instruction executing portion. However, when data required in the central processing unit is not found in the buffer storage (when a miss hit occurs), a new block of data which contains the required data is transferred (move-in) from the main storage to the buffer storage.
There are two methods of storing data in the main storage. One is called a write-through method, and the other is called the above-mentioned write-back (store-in) method.
In the write-through method, every storage operation in the buffer storage is immediately repeated in the corresponding portion of the main storage. On the other hand, in the write-back (store-in) method, when a hit occurs in an address searching operation for a data storing operation, the content of the buffer storage is renewed by the instruction executing portion in the central processing unit, and the corresponding content of the main storage is left as before the renewing operation of the buffer storage. Further, the renewal of the content of the main storage corresponding to the renewed data in the buffer storage is carried out just before the block containing the stored data in the buffer storage is replaced by a copy of the other block in the main storage.
According to the above-mentioned write-back method, the above replacement of a block in the buffer storage is carried out as follows.
As mentioned before, when a miss hit occurs in the buffer storage, a copy of a new block containing required data in the main storage must be written in an area of the buffer storage. When no vacant area exists in the buffer storage, the above copy of the new block is over-written in the area in which the other block data has been stored in the buffer storage.
Since, in the write-back method, the renewed content in the block area to be replaced by the other block data from the main storage is not written in the corresponding block area in the main storage, the content of the block area to be replaced must be transferred (moved-out) from the buffer storage to the main storage before the new data block is written in the area in the buffer storage.
(2) Description of the Related Art
FIG. 1 shows an outline of the construction for carrying out the moving-out operation in the conventional buffer storage system.
In FIG. 1, reference numeral 5 denotes a buffer storage, 6 denotes a move-out buffer register, and 20 denotes an address register.
In the buffer storage 5, a plurality of blocks of data wherein each of the blocks consists of, for example, 64 bytes, are stored. When a block of data is moving-out from the buffer storage 5, one line of data in the block, where one line consists of eight bytes of data, is transferred from the buffer storage 5 to the move-out buffer register 6 in one cycle. Namely, the transferring operation of one line must be carried out eight times for moving-out the whole block.
The move-out buffer register 6 is provided as a buffer between the buffer storage side and the main storage side, and has a capacity corresponding to at least one block, i.e., 64 bytes in the example of FIG. 1.
In the construction for carrying out the moving-out operation in the conventional buffer storage system as shown in FIG. 1, however, the instruction executing portion cannot carry out a data fetch operation in the buffer storage until the operation of the replacement of the block including the above moving-out operation is completed. Therefore, it is required to reduce the time necessary for carrying out the moving-out operation.